﻿/*
 *Author: Jeff Liu 
 *
 *Under MIT License
 *jebberwocky@gmail.com
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CtpGglMap
{
    /// <summary>
    /// for shorten requet url
    /// </summary>
    public interface ICluster
    {
        /// <summary>
        /// the Static Google Map
        /// </summary>
        IMap Map { set; get; }

        /// <summary>
        /// return the shorten request url
        /// </summary>
        /// <returns></returns>
        String GetShortenUrl();
        
        /// <summary>
        /// get the map items which is displayed on map
        /// </summary>
        List<IMapItem> VisibleItems { get; }

        /// <summary>
        /// get the map items which is hided from map
        /// </summary>
        List<IMapItem> InvisibleItems { get; }
    }

    public interface IMap
    {
        /// <summary>
        /// current center of map
        /// </summary>
        GeoPoint Center { get; set; }

        /// <summary>
        /// current map type
        /// </summary>
        String MapType { get; set; }

        /// <summary>
        /// the bounded north east 
        /// </summary>
        GeoPoint NEBound { get; set; }

        /// <summary>
        /// the bounded south west
        /// </summary>
        GeoPoint SWBound { get; set; }

        /// <summary>
        /// the zoom level
        /// </summary>
        int Zoom { get; set; }

        /// <summary>
        /// the sensor
        /// </summary>
        bool Sensor { get; set; }

        /// <summary>
        /// add IMapItem to map
        /// </summary>
        /// <param name="item"></param>
        void AddItem(IMapItem item);
        
        /// <summary>
        /// get IMapItems as List
        /// </summary>
        /// <returns></returns>
        List<IMapItem> GetItems();
    }

    /// <summary>
    /// Interface for various items on map; marker, polylines, polygons, and so on.
    /// </summary>
    public interface IMapItem
    {
        /// <summary>
        /// set the parent map
        /// </summary>
        /// <param name="map"></param>
        void SetMap(IMap map);
    }

    /// <summary>
    /// Interface to represent a point on map
    /// </summary>
    public interface GeoPoint
    {
        /// <summary>
        /// the text representation of a point
        /// </summary>
        String Address { get; set; }

        /// <summary>
        /// the latitude 
        /// </summary>
        double Lat { get; set; }

        /// <summary>
        /// the longtitude
        /// </summary>
        double Lng { get; set; }
    }
}
